home *** CD-ROM | disk | FTP | other *** search
- WINDOW OFF
- COORDINATE WINDOW
- ' Find out what application is named
- ResName$=FILES$(1,"",,vol%)
- IF ResName$="" THEN END
- 'Open application resource file
- Refnum=FN OPENRESFILE(ResName$)
- Errnum=FN RESERROR
- LONG IF Errnum<>0
- BEEP:PRINT"ERROR# ";Errnum
- PRINT "Problem with Resource File!"
- FOR i=1 TO 1000:NEXT i:END
- END IF
- CALL LOADRESOURCE(Refnum):'Load Resource into memory
- Rhndl&=FN GETRESOURCE(CVI("PASS"),1)
- ResPtr&=USR3(Rhndl&):'Lock the handle and return a pointer
- firstint=PEEK WORD(ResPtr&):' get the first integer
- secondint=PEEK WORD(ResPtr&+2):'get the second integer
- FOR i=1 TO PEEK(ResPtr&+4)
- string$=string$+CHR$(PEEK(ResPtr&+4+i))
- NEXT i
- PRINT firstint,secondint,string$
- POKE WORD(ResPtr&),secondint:'save second into 1st integer
- POKE WORD(ResPtr&+2),firstint:' save first into 2nd integer
- POKE(ResPtr&+4),LEN(string$)
- FOR i=LEN(string$) TO 1 STEP -1
- Newstring$=Newstring$+MID$(string$,i,1)
- NEXT i
- FOR i=1 TO LEN(Newstring$)
- POKE(ResPtr&+4+i),(ASC(MID$(Newstring$,i,1)))
- NEXT i
- CALL CHANGEDRESOURCE(Rhndl&)
- ResPtr&=USR7(Rhndl&):' Unlock the resource handle
- CALL CLOSERESFILE(Refnum)
- END
-